home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX Base Documentation 1998 November
/
IRIX 6.5.2 Base Documentation November 1998.img
/
usr
/
share
/
catman
/
p_man
/
cat3
/
f90
/
scan.z
/
scan
Wrap
Text File
|
1998-10-30
|
2KB
|
59 lines
SCAN(3I) Last changed: 1-6-98
NNAAMMEE
SSCCAANN - Scans a string for any one of the characters in a set of
characters
SSYYNNOOPPSSIISS
SSCCAANN (([SSTTRRIINNGG==]_s_t_r_i_n_g,, [SSEETT==]_s_e_t [,,[BBAACCKK==]_b_a_c_k]))
IIMMPPLLEEMMEENNTTAATTIIOONN
UNICOS, UNICOS/mk, and IRIX systems
SSTTAANNDDAARRDDSS
Fortran 90
DDEESSCCRRIIPPTTIIOONN
The SSCCAANN intrinsic function scans a string for any one of the
characters in a set of characters. It accepts the following
arguments:
_s_t_r_i_n_g Must be of type character.
_s_e_t Must be of type character.
_b_a_c_k Must be of type logical. If _b_a_c_k is omitted, a value of
false is assumed.
SSCCAANN is an elemental function. The name of this intrinsic cannot be
passed as an argument.
RREETTUURRNN VVAALLUUEESS
SSCCAANN returns the character position of the first character in _s_t_r_i_n_g
that matches any characters in _s_e_t. The result is a default integer.
If _b_a_c_k is absent or present with value false and if _s_t_r_i_n_g contains
at least one character that is in _s_e_t, the value of the result is the
position of the leftmost character of _s_t_r_i_n_g that is in _s_e_t.
If _b_a_c_k is present with the value true, and if _s_t_r_i_n_g contains at
least one character that is in _s_e_t, the value of the result is the
position of the rightmost character of _s_t_r_i_n_g that is in _s_e_t.
SSCCAANN returns zero if no character in _s_t_r_i_n_g is in _s_e_t, or if the
length of _s_t_r_i_n_g is zero.
EEXXAAMMPPLLEESS
Example 1: The statement SSCCAANN((''FFOORRTTRRAANN'',, ''TTRR'')) returns the value 3.
Example 2: The statement SSCCAANN((''FFOORRTTRRAANN'',, ''TTRR'',, BBAACCKK==..TTRRUUEE..)) returns
the value 5.
Example 3: The statement SSCCAANN((''FFOORRTTRRAANN'',, ''BBCCDD'')) returns the value 0.
SSEEEE AALLSSOO
_I_n_t_r_i_n_s_i_c _P_r_o_c_e_d_u_r_e_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR-2138, for the
printed version of this man page.